Skip to content

Conversation

KN4CK3R
Copy link
Member

@KN4CK3R KN4CK3R commented Oct 23, 2021

As discussed in Discord. This PR reads the expected buffer size from a reader.
If you don't like the helper method I could inline the EOF check in every place.

@KN4CK3R KN4CK3R added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Oct 23, 2021
@KN4CK3R KN4CK3R added this to the 1.16.0 milestone Oct 23, 2021
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 23, 2021
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 23, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2021

Codecov Report

Merging #17409 (afb5e4b) into main (932780c) will increase coverage by 0.02%.
The diff coverage is 59.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #17409      +/-   ##
==========================================
+ Coverage   45.25%   45.28%   +0.02%     
==========================================
  Files         788      789       +1     
  Lines       88440    88442       +2     
==========================================
+ Hits        40025    40047      +22     
+ Misses      41936    41920      -16     
+ Partials     6479     6475       -4     
Impacted Files Coverage Δ
modules/git/blob.go 55.55% <0.00%> (ø)
routers/web/repo/lfs.go 0.00% <0.00%> (ø)
routers/web/repo/view.go 40.20% <40.00%> (ø)
modules/charset/charset.go 71.71% <50.00%> (ø)
modules/repofiles/update.go 37.20% <50.00%> (ø)
modules/typesniffer/typesniffer.go 93.54% <50.00%> (ø)
routers/web/repo/editor.go 24.15% <50.00%> (ø)
modules/csv/csv.go 75.92% <100.00%> (+2.71%) ⬆️
modules/util/io.go 100.00% <100.00%> (ø)
routers/common/repo.go 72.22% <100.00%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 932780c...afb5e4b. Read the comment docs.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 23, 2021
@zeripath zeripath merged commit f99d50f into go-gitea:main Oct 24, 2021
@zeripath
Copy link
Contributor

Please send backport

KN4CK3R added a commit to KN4CK3R/gitea that referenced this pull request Oct 25, 2021
* Read expected buffer size.

* Changed name.
zeripath pushed a commit that referenced this pull request Oct 25, 2021
Backport of #17409

* Read expected buffer size.

* Changed name.
@zeripath zeripath added the backport/done All backports for this PR have been created label Oct 25, 2021
@KN4CK3R KN4CK3R deleted the refactor-buffer branch October 26, 2021 14:24
zeripath added a commit to zeripath/gitea that referenced this pull request Oct 27, 2021
Unforunately go-gitea#17435 is a somewhat critical bug and therefore we should
really release 1.15.6 as soon as possible.

 ## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-27

* BUGFIXES
  * Prevent panic in serv.go with Deploy Keys (go-gitea#17434) (go-gitea#17435)
  * Fix CSV render error (go-gitea#17406) (go-gitea#17431)
  * Read expected buffer size (go-gitea#17409) (go-gitea#17430)

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath mentioned this pull request Oct 27, 2021
lunny pushed a commit that referenced this pull request Oct 28, 2021
* Changelog 1.15.6

Unforunately #17435 is a somewhat critical bug and therefore we should
really release 1.15.6 as soon as possible.

 ## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-27

* BUGFIXES
  * Prevent panic in serv.go with Deploy Keys (#17434) (#17435)
  * Fix CSV render error (#17406) (#17431)
  * Read expected buffer size (#17409) (#17430)

Signed-off-by: Andrew Thornton <[email protected]>

* Add 17456 and its backport

Signed-off-by: Andrew Thornton <[email protected]>

* Add 17464

Signed-off-by: Andrew Thornton <[email protected]>

* Add final pr

* Update date

Co-authored-by: wxiaoguang <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this pull request Oct 28, 2021
Frontport go-gitea#17457

 ## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-28

* BUGFIXES
  * Prevent panic in serv.go with Deploy Keys (go-gitea#17434) (go-gitea#17435)
  * Fix CSV render error (go-gitea#17406) (go-gitea#17431)
  * Read expected buffer size (go-gitea#17409) (go-gitea#17430)
  * Ensure that restricted users can access repos for which they are members (go-gitea#17460) (go-gitea#17464)
  * Make commit-statuses popup show correctly (go-gitea#17447) (go-gitea#17466)
* TESTING
  * Add integration tests for private.NoServCommand and private.ServCommand (go-gitea#17456) (go-gitea#17463)
zeripath added a commit that referenced this pull request Oct 28, 2021
Frontport #17457

 ## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-28

* BUGFIXES
  * Prevent panic in serv.go with Deploy Keys (#17434) (#17435)
  * Fix CSV render error (#17406) (#17431)
  * Read expected buffer size (#17409) (#17430)
  * Ensure that restricted users can access repos for which they are members (#17460) (#17464)
  * Make commit-statuses popup show correctly (#17447) (#17466)
* TESTING
  * Add integration tests for private.NoServCommand and private.ServCommand (#17456) (#17463)
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
* Read expected buffer size.

* Changed name.
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
Frontport go-gitea#17457

 ## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-28

* BUGFIXES
  * Prevent panic in serv.go with Deploy Keys (go-gitea#17434) (go-gitea#17435)
  * Fix CSV render error (go-gitea#17406) (go-gitea#17431)
  * Read expected buffer size (go-gitea#17409) (go-gitea#17430)
  * Ensure that restricted users can access repos for which they are members (go-gitea#17460) (go-gitea#17464)
  * Make commit-statuses popup show correctly (go-gitea#17447) (go-gitea#17466)
* TESTING
  * Add integration tests for private.NoServCommand and private.ServCommand (go-gitea#17456) (go-gitea#17463)
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants